package com.glory.brepda.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.brepda.R;
import com.glory.brepda.entity.MultiEqpBean;

import java.util.List;

/**
 * FileName: LotShelvesLotInfoAdapter
 * Author: XJH
 * Date: 2020/8/6 14:05
 * Description:
 * History:
 */

public class EqpUnitAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public EqpUnitAdapter(@Nullable List<String> data) {
        super(R.layout.adapter_eqp_unit, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String s) {
        helper.setText(R.id.tvEqpId,s);
        ImageView ivDelete = helper.getView(R.id.ivDelete);

        ivDelete.setOnClickListener(view -> {
            remove(helper.getAdapterPosition());
            notifyDataSetChanged();
        });

    }
}
